import Vue from 'vue';
import Vuex from 'vuex';

import Util from '@/libs/util';

//基础APP
import app from './modules/app';

//系统管理模块
import role from '@/routes/admin/role/module';
import permission from '@/routes/admin/permission/module';
import organ from '@/routes/admin/organ/module';
import resource from '@/routes/admin/resource/module';
import user from '@/routes/admin/user/module';
import session from '@/routes/admin/session/module';
import dic from '@/routes/admin/dic/module';
import cache from '@/routes/admin/cache/module';
import event from '@/routes/admin/event/module';
import error from '@/routes/admin/error/module';
import modify from '@/routes/admin/modify/module';
import opinion from '@/routes/admin/opinion/module';
import sysLog from '@/routes/admin/sysLog/module';

//博客模块
import article from '@/routes/blog/article/module';
import legal from '@/routes/form/advanced-form/module';
Vue.use(Vuex);

const store = new Vuex.Store({
	modules: {
    app,
		role,
    permission,
    resource,
    user,
    session,
    dic,
    cache,
    article,
    organ,
    event,
    error,
    modify,
    opinion,
    sysLog,
    legal
	},
})

export default store;
